<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Bomberman:  Fichier source de /home/ph3w/Bureau/lif7-bomberman/coordonnees.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Généré par Doxygen 1.7.1 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div class="header">
  <div class="headertitle">
<h1>/home/ph3w/Bureau/lif7-bomberman/coordonnees.h</h1>  </div>
</div>
<div class="contents">
<a href="coordonnees_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef COORDONNEES_h</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define COORDONNEES_h</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">/*!</span>
<a name="l00005"></a>00005 <span class="comment">* @struct s_Coordonnees</span>
<a name="l00006"></a>00006 <span class="comment">* @brief struct de coordonnées ( x,y )</span>
<a name="l00007"></a>00007 <span class="comment">*/</span>
<a name="l00008"></a><a class="code" href="structs___coordonnees.html">00008</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00009"></a><a class="code" href="structs___coordonnees.html#aaf8eb7cb396be8207c9c3c63a806de51">00009</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    x,
<a name="l00010"></a>00010                     y;
<a name="l00011"></a>00011 } <a class="code" href="structs___coordonnees.html" title="struct de coordonnées ( x,y )">s_Coordonnees</a>;
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">/*!</span>
<a name="l00016"></a>00016 <span class="comment">* @fn s_Coordonnees coordonneeConvert( unsigned int x, unsigned int y )</span>
<a name="l00017"></a>00017 <span class="comment">* @brief Permet de créer facillement une stucture s_Coordonnees initialisée</span>
<a name="l00018"></a>00018 <span class="comment">* @param[in] x Coordonnée X</span>
<a name="l00019"></a>00019 <span class="comment">* @param[in] y Coordonnée Y</span>
<a name="l00020"></a>00020 <span class="comment">*/</span>
<a name="l00021"></a><a class="code" href="coordonnees_8h.html#a6672966a8002c5f5e0a711f7029b0e7d">00021</a> <span class="keyword">inline</span> <a class="code" href="structs___coordonnees.html" title="struct de coordonnées ( x,y )">s_Coordonnees</a> <a class="code" href="coordonnees_8h.html#a6672966a8002c5f5e0a711f7029b0e7d" title="Permet de créer facillement une stucture s_Coordonnees initialisée.">coordonneeConvert</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y )
<a name="l00022"></a>00022 {
<a name="l00023"></a>00023     <a class="code" href="structs___coordonnees.html" title="struct de coordonnées ( x,y )">s_Coordonnees</a> pos;
<a name="l00024"></a>00024     pos.<a class="code" href="structs___coordonnees.html#a58e4c6bec574940d228bf0a1b8b6b308">x</a> = x;
<a name="l00025"></a>00025     pos.<a class="code" href="structs___coordonnees.html#aaf8eb7cb396be8207c9c3c63a806de51">y</a> = y;
<a name="l00026"></a>00026     <span class="keywordflow">return</span> pos;
<a name="l00027"></a>00027 }
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="comment"></span>
<a name="l00030"></a>00030 <span class="comment">/*!</span>
<a name="l00031"></a>00031 <span class="comment">* @fn inline void coordonneeConvert( unsigned int x, unsigned int y, s_Coordonnees&amp; pos )</span>
<a name="l00032"></a>00032 <span class="comment">* @param pos La variable dans laquelle on va mettre X et Y</span>
<a name="l00033"></a>00033 <span class="comment">* @brief Permet de facillement initialisée une stucture s_Coordonnees</span>
<a name="l00034"></a>00034 <span class="comment">* @param[in] x Coordonnée X</span>
<a name="l00035"></a>00035 <span class="comment">* @param[in] y Coordonnée Y</span>
<a name="l00036"></a>00036 <span class="comment">* @param[in,out] pos Là où vont être stockées les coordonnées</span>
<a name="l00037"></a>00037 <span class="comment">*/</span>
<a name="l00038"></a><a class="code" href="coordonnees_8h.html#ab89e0923e3a5fc987c95a47449ecfb12">00038</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="coordonnees_8h.html#a6672966a8002c5f5e0a711f7029b0e7d" title="Permet de créer facillement une stucture s_Coordonnees initialisée.">coordonneeConvert</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y, <a class="code" href="structs___coordonnees.html" title="struct de coordonnées ( x,y )">s_Coordonnees</a>&amp; pos )
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040     pos.<a class="code" href="structs___coordonnees.html#a58e4c6bec574940d228bf0a1b8b6b308">x</a> = x;
<a name="l00041"></a>00041     pos.<a class="code" href="structs___coordonnees.html#aaf8eb7cb396be8207c9c3c63a806de51">y</a> = y;
<a name="l00042"></a>00042 }
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="comment"></span>
<a name="l00045"></a>00045 <span class="comment">/*!</span>
<a name="l00046"></a>00046 <span class="comment">* @fn bool coordonneeEgal( const s_Coordonnees&amp; c1, const s_Coordonnees&amp; c2 )</span>
<a name="l00047"></a>00047 <span class="comment">* @brief Permet comparer le contenue de 2 variables de type s_Coordonnees</span>
<a name="l00048"></a>00048 <span class="comment">* @param[in] c1 Coordonnées à comparer avec c2</span>
<a name="l00049"></a>00049 <span class="comment">* @param[in] c2 Coordonnées à comparer avec c1</span>
<a name="l00050"></a>00050 <span class="comment">*/</span>
<a name="l00051"></a>00051 <span class="comment">//#define coordonneeEgal( c1, c2 ) (c1.x == c2.x &amp;&amp; c1.y == c2.y)</span>
<a name="l00052"></a><a class="code" href="coordonnees_8h.html#ae4a79783953de477406970583dbcc7e5">00052</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="coordonnees_8h.html#ae4a79783953de477406970583dbcc7e5" title="Permet comparer le contenue de 2 variables de type s_Coordonnees.">coordonneeEgal</a>( <span class="keyword">const</span> <a class="code" href="structs___coordonnees.html" title="struct de coordonnées ( x,y )">s_Coordonnees</a>&amp; c1, <span class="keyword">const</span> <a class="code" href="structs___coordonnees.html" title="struct de coordonnées ( x,y )">s_Coordonnees</a>&amp; c2 )
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054     <span class="keywordflow">return</span> ( c1.<a class="code" href="structs___coordonnees.html#a58e4c6bec574940d228bf0a1b8b6b308">x</a> == c2.<a class="code" href="structs___coordonnees.html#a58e4c6bec574940d228bf0a1b8b6b308">x</a> &amp;&amp; c1.<a class="code" href="structs___coordonnees.html#aaf8eb7cb396be8207c9c3c63a806de51">y</a> == c2.<a class="code" href="structs___coordonnees.html#aaf8eb7cb396be8207c9c3c63a806de51">y</a> );
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Généré le Fri Jan 21 2011 01:21:27 pour Bomberman par&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
